<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>2d动画</title>
    <style>
        .weiyi {
            width: 200px;
            height: 100px;
            background-color: pink;
            /* animation: name duration timing-function delay iteration-count direction fill-mode; */
            animation: move 2s ease 2 alternate;
        }
        @keyframes move {
            0% {
                transform: translate(0,0);

            }
            50% {
                transform: translate(200px,0);
            }
            to {
                transform: translate(100px,100px);
            }
        }
        .suofang {
            width: 20px;
            height: 20px;
            background-color: blue;
            margin: 0 auto;

        }
        div[class*="box"] {
            width: 25px;
            height: 25px;
            box-shadow: 0 0 20px;
            
        }
    
    </style>
</head>

<body>
    <div class="weiyi">
        123
    </div>
    <div class="suofang">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
    </div>
</body>
</html>